package com.saas.service.impl;

import com.saas.dao.IStudentDao;
import com.saas.dao.impl.StudentDaoImpl;
import com.saas.entity.Student;
import com.saas.service.IStudentService;

import java.util.List;

public class StudentServiceImpl implements IStudentService {

    private IStudentDao isd = new StudentDaoImpl();

    @Override
    public List<Student> getAllStudents() {
        return isd.getAllStudents();
    }

    @Override
    public Boolean saveStudent(Student student) {
        return isd.saveStudent(student) > 0;
    }

    @Override
    public Boolean updateStudent(Student student) {
        return isd.updateStudent(student) > 0;
    }

    @Override
    public Boolean deleteStudentById(int id) {
        return isd.deleteStudentById(id) > 0;
    }
}
